import QtQuick 1.0
import StarMap 1.0
import com.nokia.symbian 1.0

Window {
    width: 360
    height: 360

    SkyView {
        id: sky
        azimuth: 23.75
        altitude: 5
        anchors { left: parent.left; top: parent.top; right: parent.right; bottom: toolbar.top }
    }

    Text {
        anchors.centerIn: parent
        color: "white"
        text: "AZ " + sky.azimuth + " h, ALT " + sky.altitude + "\u00B0"
    }

    Button {
        id: leftButton
        text: "<-"
        anchors { left: parent.left; verticalCenter: parent.verticalCenter }
        onClicked: sky.azimuth -= 0.25
    }

    Button {
        id: rightButton
        text: "->"
        anchors { right: parent.right; verticalCenter: parent.verticalCenter }
        onClicked: sky.azimuth += 0.25
    }

    Button {
        id: upButton
        text: "^"
        anchors { horizontalCenter: parent.horizontalCenter; top: parent.top }
        onClicked: sky.altitude += 5
    }

    Button {
        id: downButton
        text: "v"
        anchors { horizontalCenter: parent.horizontalCenter; bottom: toolbar.top }
        onClicked: sky.altitude -= 5
    }

    ToolBar {
        id: toolbar
        anchors.bottom: parent.bottom
        tools: ToolBarLayout {
            ToolButton {
                iconSource: "toolbar-back"
                onClicked: Qt.quit()
            }
        }
    }
}
